package com.zh.demo.service;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.zh.demo.mapping.EmpMapping;
import com.zh.demo.model.Book;
import com.zh.demo.model.Teacher;

@Service
public class EmpService {
	
	@Resource
	private EmpMapping empm;
	
	public List<Book> findAll(){
		return empm.findAll();
		
	}
	@Transactional//事务控制
	public int add(Book book) {
		// TODO Auto-generated method stub
		return empm.add(book);
	}
	@Transactional//事务控制
	public boolean delete(int bNum) {
		// TODO Auto-generated method stub
		return empm.delete(bNum);
	};
}
